## server

## 库路径
link_directories(${OUTPUT_PATH}/lib)

## includes src
include_directories (${PROJECT_PATH}/include/server/message)
include_directories (${PROJECT_PATH}/include/server/schedule)
include_directories (${PROJECT_PATH}/include/server/protocol)
include_directories (${PROJECT_PATH}/include/server/behavior)
include_directories (${PROJECT_PATH}/include/common)

## libprotocol.so
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/protocol SRC_PROTOCOL_PATH)
add_library(libprotocol SHARED ${SRC_PROTOCOL_PATH})
set_target_properties(libprotocol PROPERTIES OUTPUT_NAME "protocol")
set_target_properties(libprotocol PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(libprotocol c stdc++)

## libmsg.so
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/message  SRC_MSG_PATH)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/schedule SRC_MSG_PATH)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/behavior SRC_MSG_PATH)
add_library(libmsg SHARED ${SRC_MSG_PATH})
set_target_properties(libmsg PROPERTIES OUTPUT_NAME "msg")
set_target_properties(libmsg PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(libmsg c rt protocol stdc++)
add_dependencies     (libmsg libprotocol)



